Get-CsUser <samaccountname> doesn't work anymore - why is that?

For the last year I've been administrating our Lync environment, mainly using powershell.

Whenever I need to see properties of a user object I'm using the above cmdlet (Get-CsUser <samaccountname>)

However, for some reason this cmdlet doesn't work as expected anymore. Either I need to use "Get-CsUser <DisplayName>" or "Get-CsUser <Domain>\<SamAccountName>"

Why is that?

Regards,

Anders.

December 19th, 2012 1:41pm

Hi,
You can use the following cmdlet to get a user object:
Get-CsUser -Identity "Pilar Ackerman"

 

Free Windows Admin Tool Kit Click here and download it now
December 20th, 2012 9:16am

Hi.
Thanks for your answer.

I'm aware of how to get user objects, what's bugging me is that I for some reason now need to specify "<domain>\" in front of the user sam account name I wish to get. It haven't been like this always. What's the cause?

Regards,

Anders

December 20th, 2012 11:59am

Hi,

I just tested on my lab.  "Get-CsUser "<DisplayName>" and "Get-CsUser domain.com\<SamAccountName>" are working fine. What the message you received when running the cmdlet?

Free Windows Admin Tool Kit Click here and download it now
December 26th, 2012 5:47am

Old but still a valid question that I'm looking for the answer.

When you just run get-csuser <samaccountname> it doesn't find anything, if you specify some other objects value it finds it, such as the SIP address.

The only thing I can think of is that it's not actually the samaccountname but some other object which contains the same value. I searched through AD and mailnickname has the same value. Testing this now.


*EDIT: Tested and it looks like Mailnickname is the actual value its searching. So if the mailnickname is the same value as samaccountname it will find the user.
  • Proposed as answer by DrewbieHD 13 hours 44 minutes ago
  • Edited by DrewbieHD 13 hours 43 minutes ago
September 27th, 2013 4:57pm

Old but still a valid question that I'm looking for the answer.

When you just run get-csuser <samaccountname> it doesn't find anything, if you specify some other objects value it finds it, such as the SIP address.

The only thing I can think of is that it's not actually the samaccountname but some other object which contains the same value. I searched through AD and mailnickname has the same value. Testing this now.


*EDIT: Tested and it looks like Mailnickname is the actual value its searching. So if the mailnickname is the same value as samaccountname it will find the user.
  • Proposed as answer by DrewbieHD Friday, September 27, 2013 9:00 PM
  • Edited by DrewbieHD Friday, September 27, 2013 9:01 PM
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2013 11:55pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics